<template>
  <div class="list">
    <div>
        <input type="text"  placeholder="请输入用户名">
        <button>搜索</button>
    </div>
    <div>
        <h2>用户列表</h2>
        <table>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>用户名</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>1</td>
                    <td>admin</td>
                    <td>
                        <router-link :to="{name:'userEdit',params:{id:1}}">编辑</router-link>
                        <a href="">删除</a>
                    </td>
                </tr>
                <tr>
                    <td>2</td>
                    <td>zs</td>
                    <td>
                        <router-link 
                          :to="{
                            //path:'/user/edit', 在使用params传递参数时，必须使用name属性
                            // 路由名称
                            name:'userEdit',
                            params:{
                              id:2,
                              name:'zs'
                            }
                          }">
                          编辑
                        </router-link>
                        <a href="">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

  </div>
</template>

<script>
export default {
  name: 'list',
  components: {},
  props: {},
  data() {
    return {
      
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {}
}
</script>

<style scoped>

</style>